package com.atguigu.crowd.mapper;

import com.atguigu.crowd.mapper.bean.Admin;
import com.atguigu.crowd.mapper.bean.AdminExample;
import java.util.List;

import com.atguigu.crowd.mapper.bean.Role;
import org.apache.ibatis.annotations.Param;


public interface AdminMapper {
    long countByExample(AdminExample example);

    int deleteByExample(AdminExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Admin record);

    int insertSelective(Admin record);

    List<Admin> selectByExample(AdminExample example);

    Admin selectByPrimaryKey(Integer id);

    //通过关键字检索admin对象
    List<Admin> selectAdminByKeyword(String keyword);

    int updateByExampleSelective(@Param("record") Admin record, @Param("example") AdminExample example);

    int updateByExample(@Param("record") Admin record, @Param("example") AdminExample example);

    int updateByPrimaryKeySelective(Admin record);

    int updateByPrimaryKey(Admin record);

    void deleteOLdRelationship(Integer adminId);

    void insertNewRelationship(@Param("adminId") Integer adminId, @Param("roleIdList") List<Integer> roleIdList);

    public static void main(String[] args) {
        System.out.println();
    }
}